{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# python方法解析顺序(MRO)\n",
    "\n",
    "所谓MRO，就是OOP中多重继承时，同名方法逐个调用的顺序（C++类默认覆盖父类方法而不是逐个调用），归根结底就是类的顺序；单继承按继承顺序，不讨论。\n",
    "\n",
    "Python 至少有三种不同的 MRO：\n",
    "\n",
    "1、经典类（classic class）的深度遍历。\n",
    "\n",
    "2、Python 2.2 的新式类（new-style class）预计算。\n",
    "\n",
    "3、Python 2.3 的新式类的 C3 算法。它也是 Python 3 唯一支持的方式。\n",
    "\n",
    "备注：经典类和新类区别，见[python经典类和新类](python经典类和新类.ipynb)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
